package cn.forward.configuration;


import cn.forward.properties.RedisKeyProperties;
import cn.forward.template.FeignAnToKtnTemplate;
import cn.forward.template.SaTokenTemplate;
import cn.forward.template.StpInterfaceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

@Configuration
@EnableConfigurationProperties({RedisKeyProperties.class})
public class SaTokenConfiguration {



    @Bean
    public SaTokenTemplate appSaTokenTemplate(){

        return new SaTokenTemplate();

    }


    @Bean
    public StpInterfaceImpl stpInterfaceImpl(RedisTemplate redisTemplate,RedisKeyProperties redisKeyProperties){

        return new StpInterfaceImpl(redisTemplate,redisKeyProperties);

    }


    @Bean
    public FeignAnToKtnTemplate feignAnToKtnTemplate(){

        return new FeignAnToKtnTemplate();

    }










}
